package top.yehot.kettle.boot.models.vo.param;

import java.util.Arrays;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import top.yehot.cmm.util.mybatis.model.PageQuery;
import top.yehot.kettle.boot.enums.GlobalParamEnum;

/**
 * 参数列表
 * 
 * @author lquan
 * @date 2022年6月3日 下午4:57:26
 */
@Getter
@Setter
@ApiModel("参数列表")
public class GlobalParamPageVO extends PageQuery {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty("通用（ENV,GLOBAL）")
	private GlobalParamEnum cmmv;
	
	@ApiModelProperty("键")
	private String pkey;
	
	public void setCmmv(String cmmv) {
		this.cmmv = Arrays.asList(GlobalParamEnum.values()).stream().filter(e -> e.getValue().equals(cmmv)).findFirst().orElse(null);
	}
	
}
